package reflect;

public class Person {
    public int pid;
    private String pname;
    private String paddr;

    public Person() {
    }

    public Person(int pid, String pname, String paddr) {
        this.pid = pid;
        this.pname = pname;
        this.paddr = paddr;
    }
    public void eat(){
        System.out.println("eat....");
    }
    public void run(){
        System.out.println("run....");
    }
    private void sleep(){
        System.out.println("sleep...");
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getPaddr() {
        return paddr;
    }

    public void setPaddr(String paddr) {
        this.paddr = paddr;
    }

    @Override
    public String toString() {
        return "Person{" +
                "pid=" + pid +
                ", pname='" + pname + '\'' +
                ", paddr='" + paddr + '\'' +
                '}';
    }
}
